import request from '@/router/axios';

export const getList = (page, size, params) => {
    return request({
        url: '/dis/user/listUserManager',
        method: 'post',
        params: {
            ...params,
            page,
            size,
        }
    })
}
export const userDetail = (params) => {
    return request({
        url: '/dis/user/detail',
        method: 'post',
        params: {
            ...params,
        }
    })
}
/*export const area = (level) => {
    return request({
        url: '/base/area/getAreaListByLevel',
        method: 'get',
        params: {
            level
        }
    })
}*/

export const level=()=> {
    return request({
        url: '/dis/userType/listAll',
        method: 'get',
        params: {
        }
    })
}
export const remove = (id) => {
    return request({
        url: '/dis/user/delete',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            id,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/dis/user/add',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/dis/user/editItem',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data:row
    })
}

export const checkPhone = (value,value1) => {
    return request({
        url: '/dis/user/checkPhone',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            phone: value,
            userId: value1
        }
    })
};

/*export const changeStatus = (userId, status) => {
    return request({
        url: '/dis/user/changeStatus',
        method: 'post',
        meta: {
            isSerialize: true,
        },
        data: {
            userId,
            status
        }
    })
}*/